package com.cleanly.boot.dao;

import com.cleanly.boot.dao.impl.UserProvider;
import com.cleanly.boot.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author wangyupeng
 * @despriction:
 * @ate:Created in 19:28 2019/1/14
 * @modify By:
 */
@Mapper
public interface UserDao {
    @Select("select code from ldcode ")
    public List<String> test();

    @Select("select * from t_user ")
    public List<User> queryUserInfo();

    @SelectProvider(type =UserProvider.class,method = "getInfo")
    User getInfo(@Param("user") User user);

    @InsertProvider(type =UserProvider.class,method ="addUser" )
    int addUser(User user);

    @DeleteProvider(type =UserProvider.class,method ="deleteUser" )
    int deleteUser(User user);

    @UpdateProvider(type =UserProvider.class,method ="updateUser")
    int updateUser(User userInfo);

    @SelectProvider(type = UserProvider.class,method = "login")
    public Integer login(User user);
}
